<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>恭喜，微信授权成功！</title>
    <style>
        .container {
            width: 60%;
            margin: 10% auto 0;
            background-color: #f0f0f0;
            padding: 2% 5%;
            border-radius: 10px
        }
        ul {
            padding-left: 20px;
        }

        ul li {
            line-height: 2.3
        }

        a {
            color: #20a53a
        }
    </style>
</head>

<body>
    <div class="container">
        <h1>恭喜, 微信授权成功！</h1>
        <h3>这是默认index.html，本页面由系统自动生成</h3>
    </div>
    <script type="text/javascript" charset="utf-8">
        ws = new WebSocket("ws://127.0.0.1:2346");
        ws.onopen = function() {
            console.log("微信授权成功！");
            ws.send('ok');
        };
        ws.onmessage = function(e) {
            console.log("收到服务端的消息： " + e.data);
            //ws.send('保持连接， 发第二次信息， 查看服务器回应');
        }; 
    </script>
</body>

</html>